package cn.jd.pet.service.impl;

import cn.jd.basic.query.BaseQuery;
import cn.jd.basic.util.PageList;
import cn.jd.org.mapper.EmployeeMapper;
import cn.jd.pet.domain.PetOnlineAuditLog;
import cn.jd.pet.mapper.PetMapper;
import cn.jd.pet.service.IPetOnlineAuditLogService;
import cn.jd.basic.service.impl.BasicServiceImpl;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jd
 * @since 2022-10-28
 */
@Service
public class PetOnlineAuditLogServiceImpl extends BasicServiceImpl<PetOnlineAuditLog> implements IPetOnlineAuditLogService {
    @Autowired
    private PetMapper mapper;
    @Override
    public PageList<PetOnlineAuditLog> queryByPage(BaseQuery query) {
        PageList<PetOnlineAuditLog> pageList = super.queryByPage(query);
        List<PetOnlineAuditLog> rows = pageList.getRows();
        for (PetOnlineAuditLog petOnlineAuditLog : rows) {
           petOnlineAuditLog.setPet(mapper.findByAuId(petOnlineAuditLog.getId()));
        }
        return pageList;
    }
}
